<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>全球COVID-19实时数据统计</title>
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css">

</head>
<body>

<div class="container">

    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="page-header">
                <h1>
                    <small>最新新冠情况</small>
                </h1>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-md-4 column">
            <form th:action="@{/}"  method="get">
                <input type="text" name="country" th:placeholder="请输入国家名"/>
                <input type="submit" value="搜索">
            </form>
        </div>
    </div>

    <div class="row clearfix">
        <div class="col-md-12 column">
            <table class="table table-hover table-striped">
                <thead>
                <tr>
                    <th>州/省</th>
                    <th>国家</th>
                    <th>最新总数</th>
                    <th>新增数</th>
                </tr>
                </thead>

                <tbody>
                <tr th:each="regionStates:${RegionStatesLists}">
                    <td th:text="${regionStates.getState() }"></td>
                    <td th:text="${regionStates.getCountry() }"></td>
                    <td th:text="${regionStates.getLatestTotalCases() }"></td>
                    <td th:text="${regionStates.getDiffFromPrevDay() }"></td>
                </tr>
                </tbody>
            </table>

        </div>
        <div class="pagination_area pull-right mt-5">
            <ul>
                <td><a th:href="@{'/?'+'country='+${country}+'&page=1'}">首页</a></td>
                <td><a th:href="@{'/?'+'country='+${country}+'&page='+${currentpage-1}}">上一页</i></a></td>
                <td th:text="${currentpage}"></td>
                <td><a th:href="@{'/?'+'country='+${country}+'&page='+${currentpage+1}}">下一页</a></td>
                <td><a th:href="@{'/?'+'country='+${country}+'&page='+${lastpage}}">尾页</a></td>
            </ul>
        </div>

    </div>
</div>
</body>
</html>